//
//  SetBlack.m
//  ToYourHeartNews
//
//  Created by XJing on 16/1/27.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥. All rights reserved.
//

#import "SetBlack.h"
#import "BlackManager.h"
@implementation SetBlack
+ (void)setBackgroundColorWithView:(UIView *)view {
    if ([BlackManager sharedInstance].isNight) {
        // 黑色
//        view.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.9];
        view.backgroundColor = [UIColor blackColor];
//        view.backgroundColor = [UIColor blackColor];
    } else {
        // 白色
        view.backgroundColor = [UIColor whiteColor];
    }
}
// 按钮的字体颜色
+ (void)setButtonTitleColorWithButton:(UIButton *)button {
    if ([BlackManager sharedInstance].isNight) {
        [button setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
    } else {
        [button setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
    }
}
//cell的背景颜色
+(void)setCellColorWithCell:(UITableViewCell *)cell
{
    if ([BlackManager sharedInstance].isNight) {
        // 黑色
        cell.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.8];
//                cell.backgroundColor = [UIColor grayColor];
    } else {
        // 白色
        cell.backgroundColor = [UIColor whiteColor];
    }
}
+(void)setLableTitleColorWithArr:(NSArray *)lableArr
{
    if ([BlackManager sharedInstance].isNight) {
        for (UILabel *lable in lableArr) {
            lable.textColor = [UIColor whiteColor];
        }
    }else{
        for (UILabel *lable in lableArr) {
            lable.textColor = [UIColor blackColor];
        }
    }
    
}



@end
